/* memory setting */

#ifndef BFMEM_H
#define BFMEM_H

#include <stdlib.h>

#include "bconf.h"

void* bf_realloc(void* oldptr, unsigned size);

#define bf_malloc(s)	(bf_realloc(NULL, (s)))
#define bf_new(t)	((t *)bf_realloc(NULL, sizeof(t)))
#define bf_free(p)	(bf_realloc((p), 0))
#define bf_newvec(t, n)	((t *)bf_realloc(NULL, (n) * sizeof(t)))

#endif	/* BFMEM_H */
